package sceneInfo;

import java.io.IOException;
import java.io.Reader;

import weka.core.Attribute;
import weka.core.FastVector;
import weka.core.Instances;


/** subclass of WEKA Instances to represent robocup data. But it seems i may not need it. Not used for now. 
 * 
 * @author alan
 *
 */
public class RobocupInstances extends Instances {


	private static final int NUMBER_OF_OBJECTTYPES = 7;

	public RobocupInstances(FuzzyFramework framework, SceneLib scenes) {
		
		super ("", new FastVector(0), 0) ; // just the emptiest possible constructor from superclass
		int datasize = framework.getGridSize()* NUMBER_OF_OBJECTTYPES;
		
	    m_RelationName = "RobocupData"+scenes.getSceneList().get(0).getTeamName(); //team name of fist scene in scene lib
	    
		int capacity = scenes.size();
		m_Instances = new FastVector(capacity);
		// create the attribute list :
		m_Attributes = new FastVector(datasize +1 ); //datasize histogram values, + 1 for the action
		//create all the numeric attributes (histogram bins)
		for (int j =0; j<datasize; j++){
			  m_Attributes.addElement(new Attribute("HBin"+String.valueOf(j)));
		}
		m_ClassIndex = datasize; // last attribute is class : 
		

	}

}
